package org.fixies.utils;

import org.fixies.resource.ClasspathResourceLoader;
import org.fixies.resource.ResourceLoader;

import java.io.InputStream;

/**
 * // TODO change this
 * User: Tsuyoshi
 * Date: 2010/11/23
 * Time: 15:15:12
 */
public class Supporter {
    private final Class<?> testClass;
    public Supporter(Class<?> testClass) {
        this.testClass = testClass;
    }

    public static InputStream loadResource(String resourceName, Class<?> testClass) {
        ResourceLoader loader = new ClasspathResourceLoader(testClass);
        return loader.loadResource(resourceName);
    }

    public InputStream load(String resourceName) {
        return loadResource(resourceName, testClass);
    }
}
